home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol039 / multiply.bas < prev    next >
Encoding:
BASIC Source File  |  1987-01-11  |  3.0 KB  |  66 lines

  1. 10 CLS:KEY OFF:RANDOMIZE (VAL(RIGHT$(TIME$,2)))
  2. 20 DEF SEG=&H40:POKE &H17,PEEK(&H17) OR 32:'KEYPAD TO NUM SHIFT
  3. 30 PRINT TAB(20) "Multiplication Practice"
  4. 40 PRINT TAB(20) "Version 2.0   Jun 12,l983"
  5. 41 PRINT TAB(20)"AUTHOR--BRUCE T. FILBECK"
  6. 42 PRINT TAB(20)"        4240 KILGORE ROAD"
  7. 43 PRINT TAB(20)"        CROSWELL, MI 48422"
  8. 50 PRINT :PRINT :PRINT :PRINT :PRINT
  9. 52 INPUT "Do you have a printer";ANS$
  10. 54 IF LEFT$(ANS$,1)="n" OR LEFT$(ANS$,1)="N" THEN SKIP=1
  11. 60 INPUT "Do you want instructions";R$
  12. 70 IF LEFT$(R$,1)="Y" OR LEFT$(R$,1)="y" THEN GOSUB 400
  13. 80 CLS
  14. 90 INPUT "Enter the SPEED you want (1=SLOW to 10=FAST)",D$
  15. 100 IF VAL(D$)<1 OR VAL(D$)>10 THEN 90
  16. 110 D=VAL(D$)
  17. 120 FOR LOOP=1 TO 10:CLS
  18. 130 A=(INT(RND*(8+1)))+1: B=(INT(RND*(8+1)))+1
  19. 140 PRINT :PRINT :PRINT :PRINT :PRINT :PRINT :PRINT :PRINT
  20. 150 PRINT TAB(20)A;"X";B;"=";
  21. 160 Z$=INKEY$:'clears inkey$ if there is a character in it.
  22. 170 FOR DELAY=(D*300) TO 3300:A$=INKEY$:IF A$="" THEN NEXT DELAY
  23. 180 PRINT A$;:FOR DELAY=(D*300) TO 3300:B$=INKEY$:IF B$="" THEN NEXT DELAY
  24. 190 PRINT B$
  25. 200 ANSWER=VAL(A$+B$)
  26. 210 PRINT
  27. 220 IF ANSWER=(A*B) THEN BASESCORE=BASESCORE+1:PRINT TAB(20)"Right!!!":GOTO 240
  28. 230 PRINT :PRINT TAB(20)"Sorry, the CORRECT ANSWER is:";(A*B):A$="":B$="":GOTO 250
  29. 240 SCORE=BASESCORE*D*100
  30. 250 PRINT :PRINT TAB(20)"Your score is:";SCORE
  31. 260 FOR PAUSE=1 TO 2500:NEXT PAUSE
  32. 270 NEXT LOOP
  33. 280 CLS:FOR I=1 TO 12:PRINT :NEXT
  34. 290 ROUND=ROUND+1
  35. 300 PRINT TAB(20) "Your FINAL SCORE FOR ROUND #";ROUND;" is:";SCORE
  36. 305 IF SKIP=1 THEN 320
  37. 310 LPRINT TAB(20) "Your FINAL SCORE for Round #";ROUND;" is:";SCORE
  38. 320 TOTALSCORE=TOTALSCORE+SCORE:BASESCORE=0:SCORE=0
  39. 330 IF ROUND<>5 THEN 360
  40. 340 PRINT TAB(20)"Your GRAND TOTAL for the session is:";TOTALSCORE
  41. 345 IF SKIP=1 THEN 360
  42. 350 LPRINT TAB(20)"Your GRAND TOTAL for the session is:";TOTALSCORE:GOTO 390
  43. 360 PRINT "Press any key to begin the next round."
  44. 370 C$=INKEY$:IF C$="" THEN 370
  45. 380 GOTO 80
  46. 390 END
  47. 400 CLS:PRINT "The object of this game is to score a maximum number of points"
  48. 410 PRINT "by CORRECTLY answering the common multiplication problems as they "
  49. 420 PRINT "are displayed for you.  The game is played in five rounds of 10 problems"
  50. 430 PRINT "each.
  51. 440 PRINT :PRINT "At the beginning of each round you will be able to select"
  52. 450 PRINT "the speed you want.  The higher the SPEED number you enter, the"
  53. 460 PRINT "less time you have to solve each problem, but the more each correct"
  54. 470 PRINT "answer is worth."
  55. 480 PRINT :PRINT "It is ONLY necessary to press the ENTER key to enter your SPEED"
  56. 490 PRINT "The program will accept problem answers directly."
  57. 500 PRINT :PRINT "The 10-key pad (on the right side of the keyboard) is in NUMBERS"
  58. 510 PRINT "SHIFT now for your convenience."
  59. 520 PRINT :PRINT "Please be sure the PRINTER is TURNED ON NOW if you have one.  Thanks."
  60. 530 PRINT :PRINT "GOOD LUCK "
  61. 540 PRINT :PRINT "Press any key to continue."
  62. 550 A$=INKEY$:IF A$="" THEN 550
  63. 560 RETURN
  64. ."
  65. 530 PRINT :PRINT "GOOD LUCK "
  66. 540 PRINT :PRINT "Press any key to continu